package com.young.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * Project Name:springmvc-mybatis-demo
 * Package Name:com.young.datasource
 * File Name:
 * Date:2018-05-29 下午 1:56
 * company: zstax
 * Copyright (c) 2018, yangcong@zstax.com All Rights Reserved.
 * Description:
 */
/**
 *
 * @author ycong
 * 实现spring多路由配置，由spring调用
 */
public class DataSourceRouter extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return HandleDataSource.getDataSource();
    }
}
